<%-- 
    Document   : quotation_additem
    Created on : Jan 12, 2009, 11:40:00 AM
    Author     : hp02
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<h3>Items</h3>
<table>
    <tr>
        <td class="menucon">
            <html:link action="/quotation_getquotations.do" title="Go to main.">Quotation</html:link>
        </td>
    </tr>
</table>
<html:messages id="messages" property="customMessage" message="true">
    <div><bean:write name="messages"/></div>
</html:messages>
<html:errors/>
<html:messages id="messages" property="message" message="true">
    <ul>
        <li><bean:write name="messages"/></li>
    </ul>
</html:messages>
<table>
    <tr class="table_header">
        <th>No.</th>
        <th>Code</th>
        <th>Name</th>
        <th>Weight</th>
        <th>Unit</th>
        <th>Type</th>
        <th>Actions</th>
    </tr>
    <c:set var="x" value="0"/>
    <c:forEach items="${items}" var="item">
        <tr>
            <td>${x+1}.</td>
            <td>${item.produk.kode}</td>
            <td>${item.produk.nama}</td>
            <td class="number"><f:formatNumber type="number" minFractionDigits="2" value="${item.produk.weight}"/></td>
            <td><html:link action="/prc_getprice.do?id=${item.produk.hargaHpp.id}">${item.produk.hargaHpp.unit.nama}</html:link></td>
            <td><html:link action="/prc_getprice.do?id=${item.produk.hargaHpp.id}">${item.produk.hargaHpp.jenis.nama}</html:link></td>
            <td><html:link action="/quotation_item.do?step=setQty&id=${item.produk.id}">Continue</html:link></td>
        </tr>
        <c:set var="x" value="${x+1}"/>
    </c:forEach>
        <tr class="table_footer">
            <td colspan="10">PT. Dhemar Nusantara - PT. Rahmi Ida Nusantara</td>
        </tr>
</table>
<table>
    <tr>
        <td class="menucon">
            <html:link action="/quotation_getquotation.do?id=${idQuotation}">Cancel</html:link>
        </td>
    </tr>
</table>